package com.vast.ui.component.models;

public class Item {
	public int value;
	
	public Item(int value) {
		this.value = value;
	}
	
	public void setValue(int value) {
		this.value = value;
	}
	
	public int getValue() {
		return this.value;
	}
	
	public boolean isChecked() {
		if(value == 1) {
			return new Boolean(true);
		}
		return new Boolean(false);			
	}
	
	public void setChecked(boolean bool) {
		if(bool) {
			this.value = 1;
		} else {
			this.value = 0;
		}
	}
	
	public String getValueAsHexString() {
		return Integer.toHexString(this.value & 0xFFFFFFFF);
	}
	
	public void setValueFromHexString(String hexString) {
		this.value = (int)(Long.decode("0x" + hexString)& 0xFFFFFFFF);
	}
	
}
